package com.example.mall.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 满减活动表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_spending_reduction_activities")
public class SpendingReductionActivities extends Model<SpendingReductionActivities> {

    private static final long serialVersionUID = 1L;

    /**
     * 满减活动唯一标识
     */
    @TableId("activity_id")
    private Long activityId;
    /**
     * 满减活动名称
     */
    private String name;
    /**
     * 满减门槛金额
     */
    @TableField("min_amount")
    private BigDecimal minAmount;
    /**
     * 满减优惠金额
     */
    @TableField("discount_amount")
    private BigDecimal discountAmount;
    /**
     * 活动开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 活动结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 状态（0：未开始，1：进行中，2：已结束）
     */
    private String status;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public SpendingReductionActivities() {
        this.activityId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getMinAmount() {
        return minAmount;
    }

    public void setMinAmount(BigDecimal minAmount) {
        this.minAmount = minAmount;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "SpendingReductionActivities{" +
        ", activityId=" + activityId +
        ", name=" + name +
        ", minAmount=" + minAmount +
        ", discountAmount=" + discountAmount +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", status=" + status +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
